package com.zl.controller;

import com.zl.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;

@Controller
public class UserController3 {
    //@Autowired
    //private User user;

    //@Resource(name="user_user1")
    //private User user;

    @Autowired
    @Qualifier(value = "user_user1")
    private  User user;

    public void doController3(){
        System.out.println("doUserController3");

        System.out.println("user id:"+user.getId()+" user name:"+user.getName());
    }

}
